package cat.joronya.supermanager.europeo.market;

import java.io.IOException;
import java.io.Serializable;

public class Player implements Serializable
{
	private static final long serialVersionUID = 8388453580547123111L;
	
	public String id;
	public String codi;
	public String status;
	public String nacionality; 
	public String name;
	public String info;
	public String team;
	public String vsTeam;
	public String balance;
	public Float average;
	public Integer price;
	public String minutes;
	public Float rating;
	public Float ratingLast3Games;
	public Float increase15;
	public Float keepPrice;
	public Float decrease15;
	public String position;
	public String teamPosition;
	public boolean showInBuy;
	public String colorInBuy;
	
	// fields team detail
	public Integer day;
	public boolean sell;
	public boolean buy;
	public boolean cancel;
	public boolean change;
	public Integer cost;
	public Integer buyDay;
	public boolean victory;
	public Float averageRating;
	public Integer points;
	public Float averagePoints;
	public Integer rebounds;
	public Float averageRebounds;
	public Integer three;
	public Float averageThree;
	public Integer assistences;
	public Float averageAssistences;
	
	public Player(){
		this.sell = false;
		this.buy = false;
		this.cancel = false;
		this.change = false;
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCodi() {
		return codi;
	}

	public void setCodi(String codi) {
		this.codi = codi;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getNacionality() {
		return nacionality;
	}

	public void setNacionality(String nacionality) {
		this.nacionality = nacionality;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public String getTeam() {
		return team;
	}

	public void setTeam(String team) {
		this.team = team;
	}

	public String getVsTeam() {
		return vsTeam;
	}

	public void setVsTeam(String vsTeam) {
		this.vsTeam = vsTeam;
	}

	public String getBalance() {
		return balance;
	}

	public void setBalance(String balance) {
		this.balance = balance;
	}

	public Float getAverage() {
		return average;
	}

	public void setAverage(Float average) {
		this.average = average;
	}

	public Integer getPrice() {
		return price;
	}

	public void setPrice(Integer price) {
		this.price = price;
	}

	public String getMinutes() {
		return minutes;
	}

	public void setMinutes(String minutes) {
		this.minutes = minutes;
	}

	public Float getRating() {
		return rating;
	}

	public void setRating(Float rating) {
		this.rating = rating;
	}

	public Float getRatingLast3Games() {
		return ratingLast3Games;
	}

	public void setRatingLast3Games(Float ratingLast3Games) {
		this.ratingLast3Games = ratingLast3Games;
	}

	public Float getIncrease15() {
		return increase15;
	}

	public void setIncrease15(Float increase15) {
		this.increase15 = increase15;
	}

	public Float getKeepPrice() {
		return keepPrice;
	}

	public void setKeepPrice(Float keepPrice) {
		this.keepPrice = keepPrice;
	}

	public Float getDecrease15() {
		return decrease15;
	}

	public void setDecrease15(Float decrease15) {
		this.decrease15 = decrease15;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getTeamPosition() {
		return teamPosition;
	}

	public void setTeamPosition(String teamPosition) {
		this.teamPosition = teamPosition;
	}
	
	public boolean isShowInBuy() {
		return showInBuy;
	}

	public void setShowInBuy(boolean showInBuy) {
		this.showInBuy = showInBuy;
	}

	public String getColorInBuy() {
		return colorInBuy;
	}

	public void setColorInBuy(String colorInBuy) {
		this.colorInBuy = colorInBuy;
	}

	public void setTeamPositionByIndex(Integer index)
	{
		if( 1 <= index && index <= 3)
			setTeamPosition("b"+index);
		if( 4 <= index && index <= 7)
			setTeamPosition("a"+index);
		if( 8 <= index && index <= 11)
			setTeamPosition("p"+index);
	}

	public Integer getDay() {
		return day;
	}

	public void setDay(Integer day) {
		this.day = day;
	}

	public boolean isSell() {
		return sell;
	}

	public void setSell(boolean sell) {
		this.sell = sell;
	}

	public boolean isBuy() {
		return buy;
	}

	public void setBuy(boolean buy) {
		this.buy = buy;
	}

	public boolean isCancel() {
		return cancel;
	}

	public void setCancel(boolean cancel) {
		this.cancel = cancel;
	}

	public boolean isChange() {
		return change;
	}

	public void setChange(boolean change) {
		this.change = change;
	}

	public Integer getCost() {
		return cost;
	}

	public void setCost(Integer cost) {
		this.cost = cost;
	}

	public Integer getBuyDay() {
		return buyDay;
	}

	public void setBuyDay(Integer buyDay) {
		this.buyDay = buyDay;
	}

	public boolean isVictory() {
		return victory;
	}

	public void setVictory(boolean victory) {
		this.victory = victory;
	}

	public Float getAverageRating() {
		return averageRating;
	}

	public void setAverageRating(Float averageRating) {
		this.averageRating = averageRating;
	}

	public Integer getPoints() {
		return points;
	}

	public void setPoints(Integer points) {
		this.points = points;
	}

	public Float getAveragePoints() {
		return averagePoints;
	}

	public void setAveragePoints(Float averagePoints) {
		this.averagePoints = averagePoints;
	}

	public Integer getRebounds() {
		return rebounds;
	}

	public void setRebounds(Integer rebounds) {
		this.rebounds = rebounds;
	}

	public Float getAverageRebounds() {
		return averageRebounds;
	}

	public void setAverageRebounds(Float averageRebounds) {
		this.averageRebounds = averageRebounds;
	}

	public Integer getThree() {
		return three;
	}

	public void setThree(Integer three) {
		this.three = three;
	}

	public Float getAverageThree() {
		return averageThree;
	}

	public void setAverageThree(Float averageThree) {
		this.averageThree = averageThree;
	}

	public Integer getAssistences() {
		return assistences;
	}

	public void setAssistences(Integer assistences) {
		this.assistences = assistences;
	}

	public Float getAverageAssistences() {
		return averageAssistences;
	}

	public void setAverageAssistences(Float averageAssistences) {
		this.averageAssistences = averageAssistences;
	}

	private void readObject(java.io.ObjectInputStream stream)
		throws IOException, ClassNotFoundException
	{
		//always perform the default de-serialization first
		stream.defaultReadObject();
	}

	private void writeObject(java.io.ObjectOutputStream stream)
		throws IOException
	{
		//perform the default serialization for all non-transient, non-static fields
		stream.defaultWriteObject();
	}

}